package com.dt76.smallloanbackendservice.controller.etao;


import com.dt76.smallloanbackendservice.service.etao.SLogService;
import com.dt76.smallloanbackendservice.utils.Page;
import com.dt76.smallloanbackendservice.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SLogController {
    @Autowired
    private SLogService sLogService;

    @RequestMapping("/getPageSLog")
    @ResponseBody
    public Page getPageSLog(@RequestParam Integer pageNum,
                            @RequestParam Integer eId,
                            @RequestParam String startTime) {
        Page page = sLogService.getSLog(pageNum, eId, startTime);
        return page;
    }


    @RequestMapping("/delSLogByTime")
    @ResponseBody
    public Result delSLogByTime(@RequestParam String delTime) {
        Result result = new Result();
        boolean b = sLogService.deelByTime(delTime);
        result.setSuccess(b);
        return result;
    }

}
